package org.chen.common.translate.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * 百度翻译请求DTO
 */
@Schema(description = "百度翻译请求参数")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaiduTranslateRequestDTO {
    
    @NotBlank(message = "待翻译文本不能为空")
    @Schema(description = "待翻译文本", example = "Hello World")
    private String q;
    
    @Schema(description = "原文语言代码", example = "en", defaultValue = "en")
    @JsonProperty("from_lang")
    private String fromLang = "en";
    
    @Schema(description = "译文语言代码", example = "zh", defaultValue = "zh")
    @JsonProperty("to_lang")
    private String toLang = "zh";
}
